package com.pokerbean.housingremind.schedule;

import com.pokerbean.housingremind.service.HousingGrabService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * created by IntelliJ IDEA
 *
 * @author: pokerbean
 * @e-mail: brutalmraz@gmail.com
 * @time: 2018/5/6 0:45
 * @desc: GrabScheduler
 */
@Slf4j
@Component
public class GrabScheduler {
    @Resource
    private HousingGrabService housingGrabService;

    @Scheduled(fixedRate = 60000)
    private void grab(){
        housingGrabService.grab();
    }
}
